import axios  from "../utils/http";

const RoleStore={
    namespaced:true,
    state:()=>({
       role_list:[]
    }),
    mutations:{
        RoleMutations(state,list){
            state.role_list=list
        }
    },
    actions:{
        RoleActions(context){
            axios.get('/api/rolelist').then((res)=>{
                context.commit('RoleMutations',res.list)
            })
        }
    }
}

export default  RoleStore